package com.tj.mapper;



import com.tj.pojo.Orders;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface OrdersMapper {
    @Select("select * from orders")
    List<Orders> findAllList();
    @Select("select * from orders where orderId = #{orderId}")
    List<Orders> findOrdersListById(String orderId);
    @Insert("insert into orders(orderId, orderDate, userId, hpId, smId, state) values (#{orderId}, #{orderDate}, #{userId}, #{hpId}, #{smId}, #{state})")
    int insertOrders(Orders orders);
    @Update("update orders set orderDate = #{orderDate}, userId = #{userId}, hpId = #{hpId}, smId = #{smId}, state = #{state} where orderId = #{orderId}")
    int updateOrders(Orders orders);
    @Delete("delete from orders where orderId = #{orderId}")
    int deleteOrders(Orders orders);
}

